This is Riyaz's project website
hello friends, please click the link given in the below and download the .py file and open with python applications to enjoy the game
If you don't have a Python app on your mobile, just open the link below, swipe down, and run it
Project: Quiz Game
Objective:
Create a basic quiz game using Python. The game will ask the player a few questions, and the player will answer them. The game will give feedback based on whether the answer is correct or not.
How the Game Works:
Starting the Game:
- The game will first ask, "Do you want to play?".
- If the player answers "Yes", the game starts.
- If the player answers "No", the game ends.
Questions:
- The game will ask the player several questions.
- For each question, the player can type an answer.
- If the answer is correct, the game will say "Correct!". If the answer is wrong, it will say "Oops!".
Example Questions:
- What is the common color of an apple? (Answer: Red)
- What is our national animal? (Answer: Tiger)
- How many 'o's are there in this question? (Answer: Five or 5)
What You Learn:
- Using input(): This function is used to get the player's answers.
- Using if and else: The game checks if the player's answer matches the correct answer.
- Using .lower(): This makes the game ignore case, so "red" and "Red" are both correct.
Sample Code:
user = input("Do you want to play (Yes or No)? ")
if user.lower() == "yes":
print("The game starts!")
question = input("What is a common color of an apple? ")
if question.lower() == "red":
print("Correct!")
else:
print("Oops!")
print("Thanks for playing!")
else:
quit()
This version keeps everything simple and clear. The user can easily understand how the game works and the basic coding concepts behind it.
Thank you all